﻿import { siphonI18n } from './index'

// element-plus国际化
import enLocale from 'element-plus/dist/locale/en.mjs'
import zhLocale from 'element-plus/dist/locale/zh-cn.mjs'
import zhTwLocale from 'element-plus/dist/locale/zh-tw.mjs'

// 项目内自定义国际化
const zhModules = import.meta.globEager('./zh/**/*.ts')
const enModules = import.meta.globEager('./en/**/*.ts')
const zhTwModules = import.meta.globEager('./zh_tw/**/*.ts')

export const localesConfigs = {
  'zh_tw': {
    ...siphonI18n(zhTwModules, 'zh_tw'),
    ...zhTwLocale
  },
  zh: {
    ...siphonI18n(zhModules, 'zh'),
    ...zhLocale
  },
  en: {
    ...siphonI18n(enModules, 'en'),
    ...enLocale
  }
}
